package com.torry.workflow.common.exception;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
public class BizException extends RuntimeException implements Serializable {


    private int code;
    private String msg;


    public BizException(ExceptionEnum em) {
        this.code = em.getCode();
        this.msg = em.getMsg();
    }

    public BizException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
